package com.atguigu.spzx.utils;

import com.atguigu.spzx.model.entity.system.SysUser;

/**
 * Author: zhang xing jian
 * Date: 2025/10/13 15:50
 */
public class AuthContextUtil {

    private static final ThreadLocal<SysUser> threadlocal = new ThreadLocal<>();


    // 存储数据
    public static void set(SysUser sysUser) {
        threadlocal.set(sysUser);
    }

    // 获取数据
    public static SysUser get() {
        return threadlocal.get();
    }

    // 删除数据
    public static void remove() {
        threadlocal.remove();
    }
}
